import {request} from "@/utils/request";

// 查询频道信息列表
export function postArticle(articleDto) {
    return request({
        url: '/article/front/post',
        method: 'post',
        articleDto
    })
}

export function getPostList(data) {
    return request({
        url: '/article/front/list',
        method: 'post',
        header: {
            isToken: true,
            repeatSubmit: false
        },
        data
    })
}

export function getArticleById(id) {
    return request({
        url: `/article/front/${id}`,
        method: 'get'
    })
}

export function likePost(id) {
    return request({
        url: `/article/front/${id}`,
        method: 'put'
    })
}

export function myPost() {
    return request({
        url: `/article/front/my`,
        method: 'get'
    })
}

export function collectPost(id) {
    return request({
        url: `/article/front/collection/${id}`,
        method: 'put'
    })
}

export function myCollectedPost() {
    return request({
        url: `/article/front/collection/my`,
        method: 'get'
    })
}


